package com.pw.lit.service.impl;

import com.pw.lit.bean.Diary;
import com.pw.lit.bean.DiaryExample;
import com.pw.lit.mapper.DiaryMapper;
import com.pw.lit.service.DiaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("diaryService")
public class DiaryServiceImpl implements DiaryService {

    @Autowired
    private DiaryMapper diaryMapper;

    @Override
    public int countByExample(DiaryExample example) {
        return diaryMapper.countByExample(example);
    }

    @Override
    public int deleteByExample(DiaryExample example) {
        return diaryMapper.deleteByExample(example);
    }

    @Override
    public int deleteByPrimaryKey(Integer did) {
        return diaryMapper.deleteByPrimaryKey(did);
    }

    @Override
    public int insert(Diary record) {
        return diaryMapper.insert(record);
    }

    @Override
    public int insertSelective(Diary record) {
        return diaryMapper.insertSelective(record);
    }

    @Override
    public List<Diary> selectByExample(DiaryExample example) {
        return diaryMapper.selectByExample(example);
    }

    @Override
    public Diary selectByPrimaryKey(Integer did) {
        return diaryMapper.selectByPrimaryKey(did);
    }

    @Override
    public int updateByExampleSelective(Diary record, DiaryExample example) {

        return diaryMapper.updateByExampleSelective(record,example);
    }

    @Override
    public int updateByExample(Diary record, DiaryExample example) {
        return diaryMapper.updateByExample(record,example);
    }

    @Override
    public int updateByPrimaryKeySelective(Diary record) {
        return diaryMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Diary record) {
        return diaryMapper.updateByPrimaryKey(record);
    }
}